﻿using System.Windows;
using System.Windows.Controls;

namespace WpfTestApplication
{
    /// <summary>
    /// Interaction logic for SimpleUserControl.xaml
    /// </summary>
    public partial class SimpleUserControl : UserControl
    {
        public SimpleUserControl()
        {
            InitializeComponent();
        }

        public SimpleUserControl(string text1) : this()
        {
            this.label1.Content = text1;
        }

        public SimpleUserControl(string text1, string text2): this(text1)
        {
            this.label2.Content = text2;
        }

        private void btnShow_Click(object sender, RoutedEventArgs e)
        {
            labelText.Content = txtText.Text;
        }

        public void Initialize(string text)
        {
            this.label3.Content = text;
        }

        private void btnMsgBox_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Hello World");
        }
    }
}
